package com.mask.im.business.strategy.impl.context;

import com.mask.im.business.enums.RecoverPasswordEnum;
import com.mask.im.business.model.vo.IdentityVerificationVO;
import com.mask.im.business.common.model.RestResponse;
import com.mask.im.business.strategy.RecoverPasswordStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class RecoverPasswordContext {

	@Autowired
	private Map<String, RecoverPasswordStrategy> map;

	public RestResponse<String> executeRecoverPassword(String type, IdentityVerificationVO verificationVO){
		return map.get(RecoverPasswordEnum.execute(type)).IdentityVerification(verificationVO);
	}
}
